#include <iostream>
#include <string>
// 包含SpireMS SDK头文件
#include <sms_core.h>


int main(int argc, char *argv[])
{
    sms::Publisher pub("/topic/hello", "std_msgs::String");
    
    while (1)
    {
        nlohmann::json msg = sms::def_msg("std_msgs::String");
        msg["data"] = "hello world!";
        pub.publish(msg);
        sms::msleep(1000);
    }

    pub.join();
    return 0;
}

